﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace QuotationService.RealtimeQuotation
{
    /// <summary>
    /// 组合日线数据
    /// </summary>
    [StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Ansi)]
    internal struct ComboDailyData
    {
        /// <summary>
        /// 商品代码
        /// </summary>
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MarshalSizeConsts.CodeLength)]
        public string Code;

        /// <summary>
        /// 交易日（分钟，格式yyyyMMdd）
        /// </summary>
        public Int32 TradeDay;

        /// <summary>
        /// 开盘价
        /// </summary>
        public double OpenPrice;

        /// <summary>
        /// 最高成交价
        /// </summary>
        public double HighPrice;

        /// <summary>
        /// 最低成交价
        /// </summary>
        public double LowPrice;

        /// <summary>
        /// 收盘价
        /// </summary>
        public double ClosePrice;

        /// <summary>
        /// 总量
        /// </summary>
        public Int64 TotalKnockQty;

        /// <summary>
        /// 总成交金额
        /// </summary>
        public double TotalKnockAmt;

        /// <summary>
        /// 价格相关系数
        /// </summary>
        public double PriceCorreCoeff;

        /// <summary>
        /// 收益率相关系数
        /// </summary>
        public double ReturnRateCorreCoeff;

        /// <summary>
        /// 价格Beta系数
        /// </summary>
        public double PriceBetaCoeff;

        /// <summary>
        /// 收益率Beta系数
        /// </summary>
        public double ReturnRateBetaCoeff;
    }
}
